package token

import "context"

const Appname = "token"

type TokenService interface {
	Login(context.Context, *LoginRequest) (*Token, error)
	Logout(context.Context, *LogoutRequest) error
	Validate(context.Context, *ValidateRequest) (*Token, error)
}

type LoginRequest struct {
	Username string
	Password string
}

func NewLoginRequest() *LoginRequest {
	return &LoginRequest{}
}

type LogoutRequest struct {
}

type ValidateRequest struct {
	AccessToken string `json:"access_token"`
}

func NewValidateRequest() *ValidateRequest {
	return &ValidateRequest{}
}
